import request from '@/utils/request.js'

//登录
export function login(val) {
	return request({
		url: '/med-front-user/userFront/login',
		method: 'get',
		params: val
	})
}

//验证码
export function getCode(val) {
	return request({
		url: '/med-front-user/userFront/getValidate',
		method: 'get',
		params: val
	})
}

//判断用户名是否唯一
export function judgeAccount(val) {
	return request({
		url: '/med-front-user/userFront/isExitAccount',
		method: 'get',
		params: val
	})
}

//判断电话号码是否唯一
export function judgePhone(val) {
	return request({
		url: '/med-front-user/userFront/isExitPhone',
		method: 'get',
		params: val
	})
}

//短信验证码
export function getCodeTel(val) {
	return request({
		url: '/med-front-user/userFront/send',
		method: 'post',
		data: val
	})
}

//用户注册
export function register(val) {
	return request({
		url: '/med-front-user/userFront/register',
		method: 'get',
		params: val
	})
}

//检测电话号码格式等--电话号码登录
export function telExit(val) {
	return request({
		url: '/med-front-user/userFront/telIsExit',
		method: 'get',
		params: val
	})
}

//短信验证码--电话号码登录
export function sendSmsCode(val) {
	return request({
		url: '/med-front-user/userFront/sendLogin',
		method: 'post',
		data: val
	})
}

//用户登录 --手机验证码
export function telLogin(val) {
	return request({
		url: '/med-front-user/userFront/telsLogin',
		method: 'get',
		params: val
	})
}